<?php defined('In33hao') or exit('Access Invalid!');?>

<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>二维码背景设置</h3>
        <h5>设置二维码背景图片</h5>
      </div>
      <?php echo $output['top_link'];?> </div>
  </div>
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
      <h4 title="<?php echo $lang['nc_prompts_title'];?>"><?php echo $lang['nc_prompts'];?></h4>
      <span id="explanationZoom" title="<?php echo $lang['nc_prompts_span'];?>"></span> </div>
    <ul>

    </ul>
  </div>
  <form method="post" name="settingForm" enctype="multipart/form-data">
    <input type="hidden" name="form_submit" value="ok" />
    <div class="ncap-form-default">
      <dl class="row">
        <dt class="tit">
          <label>推广背景图片</label>
        </dt>
        <dd class="opt">
          <div class="uploadbg">
            <img src="<?php echo $output['path']; ?>" id="prev_img" alt="" width="100%" height="100%">
            <div class="uploadBtn">
              <a href="">上传图片</a>
              <input type="file" name="picbg" id="doc-ipt-file-1">
            </div>

          </div>
          <p class="notic">请根据默认图设计自己的背景图片</p>
          <div class="down"><a href="/admin/modules/mobile/index.php?act=qrcode_setting&op=down&type=index">下载默认图</a></div>
        </dd>
      </dl>
      <div class="bot"><a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="document.settingForm.submit()"><?php echo $lang['nc_submit'];?></a></div>
    </div>
  </form>
</div>
<script>
  var file = document.getElementById('doc-ipt-file-1');
  var img = document.getElementById('prev_img');
  file.onchange = function(){
    var oFReader = new FileReader();
    oFReader.readAsDataURL(this.files[0]);
    oFReader.onload = function (oFREvent) {
      img.src = oFREvent.target.result;
    };
  }
</script>
